package cn.cau.epidemicsurveysystem.bean;

import javax.persistence.*;

@Entity
@Table(name = "importantArea", schema = "gp2022", catalog = "")
public class ImportantAreaBean {
    private int importantAreaId;
    private String importantAreaName;

    @Id
    @Column(name = "importantAreaId")
    public int getImportantAreaId() {
        return importantAreaId;
    }

    public void setImportantAreaId(int importantAreaId) {
        this.importantAreaId = importantAreaId;
    }

    @Basic
    @Column(name = "importantAreaName")
    public String getImportantAreaName() {
        return importantAreaName;
    }

    public void setImportantAreaName(String importantAreaName) {
        this.importantAreaName = importantAreaName;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        ImportantAreaBean that = (ImportantAreaBean) o;

        if (importantAreaId != that.importantAreaId) return false;
        if (importantAreaName != null ? !importantAreaName.equals(that.importantAreaName) : that.importantAreaName != null)
            return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = importantAreaId;
        result = 31 * result + (importantAreaName != null ? importantAreaName.hashCode() : 0);
        return result;
    }
}
